package com.jiukuaidao.zhulin.api;

import com.jiukuaidao.library.net.ApiBaseParamAbstract;
import com.jiukuaidao.library.net.MyRetroCallBack;
import com.jiukuaidao.library.net.RootResult;
import com.jiukuaidao.zhulin.entity.ApiHistoryAddressInfo;
import com.jiukuaidao.zhulin.entity.ApiHistoryAddressInfo.AddressInfo;
import com.jiukuaidao.zhulin.util.NetUtil;
import com.jiukuaidao.zhulin.util.RetrofitUtil;

import retrofit2.Call;

/**
 * Author : PaiTaSuo
 * Date : 2016/6/15
 * Description :
 */
public class ApiGetAddAddress extends ApiBaseParamAbstract {
    public ApiGetAddAddress(AddressInfo addressInfo, MyRetroCallBack myRetroCallBack) {
        super(myRetroCallBack);
        mParams.put("baiduCityCode", addressInfo.baiduCityCode);  //城市ID
        mParams.put("consignee", addressInfo.consignee);
        mParams.put("mobile", addressInfo.mobile);
        mParams.put("longitude", addressInfo.longitude);
        mParams.put("latitude", addressInfo.latitude);
        mParams.put("address", addressInfo.address);
        mParams.put("addressId", addressInfo.addressId);
        mParams.put("street", addressInfo.street);


    }

    @Override
    public Call<RootResult<ApiHistoryAddressInfo.AddressInfo>> getCall() {
        return RetrofitUtil.getApiManager(mParams, NetUtil.getResHeaderListener()).getAddAddress(mParams);
    }
}
